package com.ys.servers.common.data;

import com.alibaba.fastjson.JSON;

/**
 * Created by taotao on 2017/5/8.
 */
public class ReturnData {

    private boolean isError = false;

    private Object data;

    private String errorMsg = "";

    private String errorCode = "";

    public boolean isError() {
        return isError;
    }

    public ReturnData setError(boolean error) {
        isError = error;
        return this;
    }

    public Object getData() {
        return data;
    }

    public ReturnData setData(Object data) {
        this.data = data;
        return this;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public ReturnData setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
        return this;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public ReturnData setErrorCode(String errorCode) {
        this.errorCode = errorCode;
        return this;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
